const shell = require('shelljs');


function run(cmd){
  if(!cmd){
    return;
  }
  cmd = cmd.toString().trim();
  if(/^(rm|cp)/.test(cmd)){
    const args = cmd.split(/\s+/);
    const cmd_ = args.shift();
    return shell[cmd_](...args);
  }else{
    return shell.exec(cmd);
  }
}


module.exports = {
  run:run
}


